-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ios): support capture 'quality' param for videos #214
Conversation
🚀 ? |
@gbrits waiting for this merge and some others, so I currently use my own published fork cordova-plugin-ns0m-media-capture |
Would really appreciate this feature. Currently, have to go into the |
@erisu thanks for the review, I'll comment and update this in a week or so 👍 |
87df9f3
to
3debc54
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes LGTM
Platforms affected
iOS
Motivation and Context
Use
quality
param for video capture on iOS too.Previously no configuration was done about it, meaning that the quality used for capture was medium as iOS default value.
Here is my suggested implementation based on previous PR #162 by @larrybahr with changes after my review and more tests + aligned default to
1
for iOS as it is for Android.Description
Follow iOS logic about video quality: doc
quality
value of0
for UIImagePickerControllerQualityTypeLow,0.5
for UIImagePickerControllerQualityTypeMedium, or1
for UIImagePickerControllerQualityTypeHigh.For any other value or when
quality
param is not provided we useUIImagePickerControllerQualityTypeMediumUIImagePickerControllerQualityTypeHigh.Testing
Confirmed the switch-case resolution with various
quality
values: 0, 0.5, 1, 2, 'foo', false, undefined, and without any captureOpts.Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)